#ifndef __CONDITION_H_
#define __CONDITION_H_

#include "Noncopyable.hpp"
#include <pthread.h>

namespace tp{

class MutexLock;

class Condition
:Noncopyable
{
public:
    Condition(MutexLock &);
    ~Condition();
    void wait();
    void notify();
    void notifyAll();

private:
    pthread_cond_t _cond;
    MutexLock & _mutex;
};

}//end of namespace tp

#endif

